package hb.software.student.group;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import domain.BaseTreeEntity;
import hb.software.student.entity.Student;

@Entity
@Table(name="T_GroupStudent")
@NamedQueries({ @NamedQuery(name = "GroupStudent.getRoot", query = "select g from GroupStudent g where g.parent is null") })
public class GroupStudent extends BaseTreeEntity<GroupStudent, Long> {

	/**
	 * 
	 */
	@Column
	String code;

	/**
	 * name for product category
	 */
	@Column
	String name;
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	private static final long serialVersionUID = 6748702632187024733L;
	@OneToMany
	List<Student> students;

}
